package com.cishu.orancle.common;

import cn.dev33.satoken.stp.StpUtil;

/**
 * 基于ThreadLocal封装的工具类，用于保存和获取线程本地变量
 * */
public class BaseContext {

    private static final ThreadLocal<Long> threadLocal = new ThreadLocal<>();

//    public static void setCurrentId(Long id) {
//        threadLocal.set(id);
//    }
//
    public static Long getCurrentId() {
        return Long.parseLong(StpUtil.getLoginId().toString());
    }
}
